using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;

namespace HadronData
{
    public class LevelContentTypeReader : ContentTypeReader<Level>
    {
        protected override Level Read(ContentReader p_contentReader, Level p_level)
        {
            Level level = new Level();
            level.Name = p_contentReader.ReadString();
            level.Mission = p_contentReader.ReadObject<String[]>();
            level.Dimensions = p_contentReader.ReadVector2();
            level.Layers = p_contentReader.ReadObject<List<Layer>>();
            level.EntityMarkers = p_contentReader.ReadObject<List<EntityMarker>>();
            level.Objectives = p_contentReader.ReadObject<LevelObjectives>();
            return level;
        }
    }
}
